package com.itheima.demoString;

public class Demo01String {
    public static void main(String[] args) {
        /*Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数:");
        int num = sc.nextInt();
        System.out.println("请输入字符串:");
        String str = sc.next();
        System.out.println(num + str);*/
        String s1 = new String();
        s1 = "abc";
        String s6 = s1;
        System.out.println("s1 = " + s1);
        char[] chs = {'a', 'b', 'c'};
        String s2 = new String(chs);
        System.out.println("s2 = " + s2);
        String s3 = new String("abc");
        String s5 = new String("abc");
        System.out.println("s3 = " + s3);
        byte[] arr = {97, 98, 99};
        String s4 = new String(arr);
        System.out.println("s4 = " + s4);
        System.out.println(s3 == s5);
        System.out.println(s1 == s6);
    }
}
